//IBRPG Loader v .6
// copyright Andrew Wooldridge 2007

var theHead = document.getElementsByTagName('head')[0];

var theResources = [
	{url:"http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/skin.css", type:"css"},
	{url:"http://yui.yahooapis.com/2.3.0/build/utilities/utilities.js", type:"js"},
	{url:"http://yui.yahooapis.com/2.3.0/build/container/container-min.js", type:"js"},
	{url:"http://yui.yahooapis.com/2.3.0/build/tabview/tabview-min.js", type:"js"},
	{url:"js/json.js",type:"js"},
	{url:"js/prefs.js",type:"js"},
	{url:"js/ibrpg_main.js",type:"js"}

];


var bootStrap = (function(){
	var resLen = theResources.length;
	for(i = 0; i< resLen; i++){
		var item = theResources[i];
		if(item.type === "js"){
			var newScript = document.createElement('script');
			newScript.setAttribute('src',item.url);
			theHead.appendChild(newScript);
		}else{
			if(item.type === "css"){
				var newStyle = document.createElement('link');
				newStyle.setAttribute('href',item.url);
				newStyle.setAttribute('rel','stylesheet');
				newStyle.setAttribute('type','text/css');
				theHead.appendChild(newStyle);
			}
		}
	}


})();